#include <stdio.h>

void calculate(int* arr, int n, int* avg, int* max) {
    int sum = 0;
    *max = arr[0];

    for (int i = 0; i < n; i++) {
        sum += arr[i];
        if (arr[i] > *max) {
            *max = arr[i];
        }
    }

    *avg = sum / n;
}

int main() {
    int arr[] = {1, 2, 3, 4, 5};
    int n = sizeof(arr) / sizeof(arr[0]);
    int avg, max;

    calculate(arr, n, &avg, &max);

    printf("Average: %d\n", avg);
    printf("Maximum: %d\n", max);

    return 0;
}
